﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using DataAccess;
using Utility;

namespace Web.sinhvien
{
    public partial class UCLichHoc : System.Web.UI.UserControl
    {
        PhanCongControl phCtr = new PhanCongControl();
        LichControl lichCtr = new LichControl();

        protected void Page_Load(object sender, EventArgs e)
        {
            if(!IsPostBack)
            {
                GridView1.AllowPaging = true;
                GridView1.PageSize = 10;
                LoadLichHoc();
            }
        }

        private void LoadLichHoc()
        {
            GridView1.DataSource = phCtr.GetLichHocSinhVien();
            GridView1.DataBind();
        }

        protected void GridView1_PageIndexChanging(object sender, GridViewPageEventArgs e)
        {
            WebHelper.pageIndexChanging(GridView1 ,  e);
            LoadLichHoc();
        }

        protected void btnTimKiem_Click(object sender, EventArgs e)
        {

        }
    }
}